Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calibration #1017

Merged
merged 6 commits into from
Jun 17, 2024
Merged

Fix calibration #1017

merged 6 commits into from
Jun 17, 2024

Conversation

fmauch
Copy link
Collaborator

@fmauch fmauch commented Jun 6, 2024

It seems that for certain robots the calibration extraction and correction fails. This PR aims at fixing this.

ToDo:

  • Add a test showing that some calibrations don't get corrected correctly
  • Fix the code (We have a fix already, locally, I just need to clean it up)
  • Add more documentation on the algorithm (It took me way too long to understand my old code...)
  • Also backport things to ROS 1 (Fix calibration Universal_Robots_ROS_Driver#704)

@fmauch fmauch self-assigned this Jun 6, 2024
@fmauch fmauch requested a review from VinDp June 7, 2024 09:24
@fmauch fmauch marked this pull request as ready for review June 7, 2024 09:24
Note: the second one fails with our current implementation
There was an error from using std::atan instead of std::atan2.
In most cases that seemed to work fine, but with certain calibrations the
calculated angle could end up in another quadrant, so atan was returning
the wrong angle.

We renamed a lot of variables and changed some of the docstrings in order
to hopefully make things more understandable in the future.
Copy link
Collaborator

@VinDp VinDp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@fmauch fmauch merged commit 557b57e into UniversalRobots:main Jun 17, 2024
11 checks passed
@fmauch fmauch deleted the fix_calibration branch June 17, 2024 08:50
mergify bot pushed a commit that referenced this pull request Jun 17, 2024
* Make calibration tests parametrizable

* Add two more real-world configurations to tests

Note: the second one fails with our current implementation

* Fix calibration correction

There was an error from using std::atan instead of std::atan2.
In most cases that seemed to work fine, but with certain calibrations the
calculated angle could end up in another quadrant, so atan was returning
the wrong angle.

We renamed a lot of variables and changed some of the docstrings in order
to hopefully make things more understandable in the future.

* Add robot model to calibration tests

* Add documentation to calibration algorithm

* Add a comment on test suite parametrization

(cherry picked from commit 557b57e)

# Conflicts:
#	ur_calibration/doc/index.rst
mergify bot pushed a commit that referenced this pull request Jun 17, 2024
* Make calibration tests parametrizable

* Add two more real-world configurations to tests

Note: the second one fails with our current implementation

* Fix calibration correction

There was an error from using std::atan instead of std::atan2.
In most cases that seemed to work fine, but with certain calibrations the
calculated angle could end up in another quadrant, so atan was returning
the wrong angle.

We renamed a lot of variables and changed some of the docstrings in order
to hopefully make things more understandable in the future.

* Add robot model to calibration tests

* Add documentation to calibration algorithm

* Add a comment on test suite parametrization

(cherry picked from commit 557b57e)

# Conflicts:
#	ur_calibration/doc/index.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants